const logger = require('../../utils/logger');

// 订单状态任务
const scheduleOrderCheck = require('./check-order');
// 会员状态任务
const scheduleMembershipCheck = require('./check-memberships');

function initScheduleTasks() {
  try {
    console.log('启动定时');
    scheduleOrderCheck();
    scheduleMembershipCheck();
  } catch (error) {
    logger.error('定时任务启动失败', error);
  }
}

initScheduleTasks();
